# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=spectools
pkgver=2011_08_R1
pkgrel=2
pkgdesc='Spectrum-Tools is a set of utilities for using the Wi-Spy USB spectrum analyzer hardware. Stable version.'
arch=('x86_64' 'aarch64')
url='http://www.kismetwireless.net/spectools/'
license=('GPL2')
depends=('bash' 'libusb' 'gtk2' 'cairo')
groups=('blackarch' 'blackarch-wireless')
source=("http://www.kismetwireless.net/code/$pkgname-${pkgver//_/-}.tar.gz")
sha512sums=('92c80b34049055cec6d677db165fb2d06d75fbff9f04d41ab81fa57900f639936e6a9a01f06165aea863b35760964016f0984f17816859d054bc9d14353e847b')

build() {
  cd "$pkgname-${pkgver//_/-}"

  autoreconf --install

  if [[ "$CARCH" == "i686" || "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr --sysconfdir=/etc
  else
    ./configure --build=arm --prefix=/usr --sysconfdir=/etc
  fi

  make
}

package() {
  cd "$pkgname-${pkgver//_/-}"

  make DESTDIR="$pkgdir" install
}

